/**
 * @Author: hrg
 * @Date: 2023-11-29 14:06:30
 * @LastEditTime: 2023-12-13 17:03:40
 * @FilePath: \web\src\main.js
 * @Description: 
 */
import { createApp } from 'vue'
import { createPinia } from "pinia"
import './style.css'
import Router from "@/route/index.js";
import App from './App.vue';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';


const AppInit = () => {
  const app = createApp(App);
  const pinia = createPinia();
  app.use(Router);
  app.use(pinia)
  app.use(Antd).mount('#app');


  // 获取浏览器可视宽高
  app.config.globalProperties.$clientWidth = document.documentElement.clientWidth,
    app.config.globalProperties.$clientHeight = document.documentElement.clientHeight,
    // 监听浏览器窗口大小变化
    window.onresize = () => {
      app.config.globalProperties.$clientWidth = document.documentElement.clientWidth,
        app.config.globalProperties.$clientHeight = document.documentElement.clientHeight
    }

}
AppInit()